package com.ymatou.shop.util;

import java.util.Random;
import java.util.UUID;

import android.os.SystemClock;

public final class RandomUtil {
	
	private static final Random sRandom = new Random(SystemClock.uptimeMillis());
	
	private RandomUtil() {}
	
	public static String randomString() {
		return UUID.randomUUID().toString();
	}

	public static long randomLong() {
		return sRandom.nextLong();
	}
	
	public static long randomPositiveLong() {
		return Math.abs(randomLong());
	}

	public static int randomInt() {
		return sRandom.nextInt();
	}
	
	public static int randomInt(int n){
		return sRandom.nextInt(n);
	}

	public static int randomPositiveInt() {
		return Math.abs(randomInt());
	}
	
	public static boolean randomBoolean() {
		return sRandom.nextBoolean();
	}

	public static float randomFloat() {
		return sRandom.nextFloat();
	}

	public static double randomDouble() {
		return sRandom.nextDouble();
	}

}
